/**
 * Created by 30947 on 2018/7/18.
 */
$(function(){

    char1();
    char2();
    char3();
    char4();
    char5();
})

//统计分析图
function char1() {

    var myChart = echarts.init($("#char1")[0]);

    var image2 = "img/hyimg/car-20.png";
    var image1 = "img/长管拖车.png";
    var com_90 = "img/hyimg/com-90.png"
    var tank_90 = "img/hyimg/tank-90.png"
    var com_20 = "img/hyimg/com-20.png"
    var com_20_2 = "img/hyimg/com-20.png"
    var tank_20 = "img/hyimg/tank-20.png"
    var tank_20_2 = "img/hyimg/tank-20_2.png"
    var car_20 = "img/hyimg/car-20.png"
    var com_45 = "img/hyimg/com-90.png"
    var tank_45= "img/hyimg/tank-45.png"
    var tank_45_1= "img/hyimg/tank-45.png"
    var fill_30= "img/hyimg/fill-30.png"
    var fill_30_1= "img/hyimg/fill-30.png"
    var fill_90= "img/hyimg/fill-90.png"

    option = {
        grid: {
            x: 0,
            y: 0,
            x2: 0,
            y2: 0,
        },

        graphic: {
            elements: [
                {
                    type: 'image',
                    left: '30%',
                    top: '30%',
                    style: {
                        image: com_20,
                        width: 100,
                        height: 63
                    }
                },
                {
                    type: 'image',
                    left: '30%',
                    top: '42%',
                    style: {
                        image: com_20_2,
                        width: 100,
                        height: 63
                    }
                },
                {
                    type: 'image',
                    left: '40%',
                    top: '5%',
                    style: {
                        image: com_90,
                        width: 150,
                        height: 80
                    }
                },
                {
                    type: 'image',
                    left: '75%',
                    top: '7.5%',
                    style: {
                        image: tank_90,
                        width: 162,
                        height: 52
                    }
                },
                {
                    type: 'image',
                    left: '14%',
                    top: '55.5%',
                    style: {
                        image: tank_20,
                        width: 208,
                        height: 121
                    }
                },
                {
                    type: 'image',
                    left: '14%',
                    top: '70%',
                    style: {
                        image: tank_20_2,
                        width: 206,
                        height: 59
                    }
                },
                {
                    type: 'image',
                    left: '10%',
                    top: '85%',
                    style: {
                        image: car_20,
                        width: 181,
                        height: 69
                    }
                },
                {
                    type: 'image',
                    left: '40%',
                    top: '75%',
                    style: {
                        image: com_45,
                        width: 150,
                        height: 80
                    }
                },
                {
                    type: 'image',
                    left: '55%',
                    top: '28%',
                    style: {
                        image: tank_45,
                        width: 164,
                        height: 70
                    }
                },
                {
                    type: 'image',
                    left: '55%',
                    top: '41%',
                    style: {
                        image: tank_45_1,
                        width: 164,
                        height: 70
                    }
                },
                {
                    type: 'image',
                    left: '78%',
                    top: '50%',
                    style: {
                        image: fill_30,
                        width: 57,
                        height: 123
                    }
                },
                {
                    type: 'image',
                    left: '78%',
                    top: '70%',
                    style: {
                        image: fill_30,
                        width: 57,
                        height: 123
                    }
                },
                {
                    type: 'image',
                    left: '78%',
                    top: '22%',
                    style: {
                        image: fill_90,
                        width: 95,
                        height: 132
                    }
                },
            ]
        },
        xAxis: {
            show: false,
            min: 0,
            max: 1000,
            axisPointer: {
                show: false
            },
        },
        yAxis: {
            show: false,
            min: 0,
            max: 1000,
            axisPointer: {
                show: false
            },
        },
        series: [{
            type: 'scatter',
            data: [{
                value: [440, 800],
                label: {
                    normal: {
                        show: true,
                        formatter: [
                            '{textBorder|90Mpa压缩机}',
                            '进气压力：20.72 bar',
                            '排气压力：164.94 bar',
                            '排气温度：23 °C',
                        ].join('\n'),
                        backgroundColor: '#eee',
                        borderRadius: 10,
                        padding: 4,
                        color: '#000',
                        fontSize: 12,
                        shadowBlur: 3,
                        shadowColor: '#888',
                        lineHeight: 25,
                        rich: {
                            textBorder: {
                                fontSize: 15,
                                textBorderColor: '#000',
                                textBorderWidth: 3,
                                color: '#fff'
                            },
                        }
                    }
                }
            }]
        },
            {
                type: 'scatter',
                data: [{
                    value: [200, 670],
                    label: {
                        normal: {
                            show: true,
                            formatter: [
                                '{textBorder|20Mpa压缩机}',
                                '进气压力：2 Mpa',
                                '排气压力：17.94 Mpa',
                                '排气温度：43.62 °C',
                            ].join('\n'),
                            backgroundColor: '#eee',
                            borderRadius: 10,
                            padding: 5,
                            color: '#000',
                            fontSize: 12,
                            shadowBlur: 3,
                            shadowColor: '#888',
                            lineHeight: 25,
                            rich: {
                                textBorder: {
                                    fontSize: 15,
                                    textBorderColor: '#000',
                                    textBorderWidth: 3,
                                    color: '#fff'
                                },
                            }
                        }
                    }
                }]
            },
            {
                type: 'scatter',
                data: [{
                    value: [200, 550],
                    label: {
                        normal: {
                            show: true,
                            formatter: [
                                '{textBorder|20Mpa压缩机}',
                                '进气压力：2 Mpa',
                                '排气压力：17.94 Mpa',
                                '排气温度：43.62 °C',
                            ].join('\n'),
                            backgroundColor: '#eee',
                            borderRadius: 10,
                            padding: 5,
                            color: '#000',
                            fontSize: 12,
                            shadowBlur: 3,
                            shadowColor: '#888',
                            lineHeight: 25,
                            rich: {
                                textBorder: {
                                    fontSize: 15,
                                    textBorderColor: '#000',
                                    textBorderWidth: 3,
                                    color: '#fff'
                                },
                            }
                        }
                    }
                }]
            },
            {
                type: 'scatter',
                data: [{
                    value: [440, 320],
                    label: {
                        normal: {
                            show: true,
                            formatter: [
                                '{textBorder|45Mpa压缩机}',
                                '进气压力：0 Mpa',
                                '排气压力：0 Mpa',
                                '排气温度：34.49 °C',
                            ].join('\n'),
                            backgroundColor: '#eee',
                            borderRadius: 10,
                            padding: 5,
                            color: '#000',
                            fontSize: 12,
                            shadowBlur: 3,
                            shadowColor: '#888',
                            lineHeight: 25,
                            rich: {
                                textBorder: {
                                    fontSize: 15,
                                    textBorderColor: '#000',
                                    textBorderWidth: 3,
                                    color: '#fff'
                                },
                            }
                        },

                        value:29,

                    }
                }]
            },
            {
                type: 'scatter',
                data: [{
                    value: [870, 720],
                    label: {
                        normal: {
                            show: true,
                            formatter: [
                                '{textBorder|70Mpa加注机}',
                                '枪口压力：0 Bar',
                                '气瓶压力：0 Bar',
                                '枪口温度：32.90 °C',
                                '气瓶温度：00.00 °C',
                                '加注金额：0.00 元'
                            ].join('\n'),
                            backgroundColor: '#eee',
                            borderRadius: 10,
                            padding: 5,
                            color: '#000',
                            fontSize: 12,
                            shadowBlur: 3,
                            shadowColor: '#888',
                            lineHeight: 25,
                            rich: {
                                textBorder: {
                                    fontSize: 15,
                                    textBorderColor: '#000',
                                    textBorderWidth: 3,
                                    color: '#fff'
                                },
                            }
                        }
                    }
                }]
            },
            {
                type: 'scatter',
                data: [{
                    value: [855, 440],
                    label: {
                        normal: {
                            show: true,
                            formatter: [
                                '{textBorder|35Mpa加注机}',
                                '枪口压力：0 Bar',
                                '枪口温度：32.90 °C',
                                '加气质量：00.00 kg',
                                '加注金额：0.00 元'
                            ].join('\n'),
                            backgroundColor: '#eee',
                            borderRadius: 10,
                            padding: 5,
                            color: '#000',
                            fontSize: 12,
                            shadowBlur: 3,
                            shadowColor: '#888',
                            lineHeight: 25,
                            rich: {
                                textBorder: {
                                    fontSize: 15,
                                    textBorderColor: '#000',
                                    textBorderWidth: 3,
                                    color: '#fff'
                                },
                            }
                        }
                    }
                }]
            },
            {
                type: 'scatter',
                data: [{
                    value: [855, 240],
                    label: {
                        normal: {
                            show: true,
                            formatter: [
                                '{textBorder|35Mpa加注机}',
                                '枪口压力：0 Bar',
                                '枪口温度：32.90 °C',
                                '加气质量：00.00 kg',
                                '加注金额：0.00 元'
                            ].join('\n'),
                            backgroundColor: '#eee',
                            borderRadius: 10,
                            padding: 5,
                            color: '#000',
                            fontSize: 12,
                            shadowBlur: 3,
                            shadowColor: '#888',
                            lineHeight: 25,
                            rich: {
                                textBorder: {
                                    fontSize: 15,
                                    textBorderColor: '#000',
                                    textBorderWidth: 3,
                                    color: '#fff'
                                },
                            }
                        }
                    }
                }]
            },
            {
                type: 'scatter',
                data: [{
                    value: [100, 870],
                    label: {
                        normal: {
                            show: true,
                            formatter: [
                                '{textBorder|2Mpa 气源}',
                                '进气流量：1944.44 标方/时',
                                '进气温度：27°C',
                                '进气体积：1783628 标方',
                                '进气质量：319827 公斤'
                            ].join('\n'),
                            backgroundColor: '#eee',
                            borderRadius: 10,
                            padding: 5,
                            color: '#000',
                            fontSize: 12,
                            shadowBlur: 3,
                            shadowColor: '#888',
                            lineHeight: 25,
                            rich: {
                                textBorder: {
                                    fontSize: 15,
                                    textBorderColor: '#000',
                                    textBorderWidth: 3,
                                    color: '#fff'
                                },
                            }
                        }
                    }
                }]
            },
            {
                type: 'scatter',
                data: [{
                    value: [720, 950],
                    label: {
                        normal: {
                            show: true,
                            formatter: [
                                '{textBorder|50B20PT026}',
                                '906.1 Bar',
                            ].join('\n'),
                            backgroundColor: '#eee',
                            borderRadius: 10,
                            padding: 5,
                            color: '#000',
                            fontSize: 12,
                            shadowBlur: 3,
                            shadowColor: '#888',
                            lineHeight: 25,
                            rich: {
                                textBorder: {
                                    fontSize: 10,
                                    textBorderColor: '#000',
                                    textBorderWidth: 3,
                                    color: '#fff'
                                },
                            }
                        }
                    }
                }]
            },
            {
                type: 'scatter',
                data: [{
                    value: [370, 950],
                    label: {
                        normal: {
                            show: true,
                            formatter: [
                                '{textBorder|10A20PT042}',
                                '20.7 Bar',
                            ].join('\n'),
                            backgroundColor: '#eee',
                            borderRadius: 10,
                            padding: 5,
                            color: '#000',
                            fontSize: 12,
                            shadowBlur: 3,
                            shadowColor: '#888',
                            lineHeight: 25,
                            rich: {
                                textBorder: {
                                    fontSize: 10,
                                    textBorderColor: '#000',
                                    textBorderWidth: 3,
                                    color: '#fff'
                                },
                            }
                        }
                    }
                }]
            },
            {
                type: 'scatter',
                data: [{
                    value: [250, 150],
                    label: {
                        normal: {
                            show: true,
                            formatter: [
                                '{textBorder|F401}',
                                '20.7 Bar',
                            ].join('\n'),
                            backgroundColor: '#eee',
                            borderRadius: 10,
                            padding: 5,
                            color: '#000',
                            fontSize: 12,
                            shadowBlur: 3,
                            shadowColor: '#888',
                            lineHeight: 25,
                            rich: {
                                textBorder: {
                                    fontSize: 10,
                                    textBorderColor: '#000',
                                    textBorderWidth: 3,
                                    color: '#fff'
                                },
                            }
                        }
                    }
                }]
            },
            {
                type: 'scatter',
                data: [{
                    value: [270, 420],
                    label: {
                        normal: {
                            show: true,
                            formatter: [
                                '{textBorder|T301A}',
                                '20.7 Bar',
                            ].join('\n'),
                            backgroundColor: '#eee',
                            borderRadius: 10,
                            padding: 5,
                            color: '#000',
                            fontSize: 12,
                            shadowBlur: 3,
                            shadowColor: '#888',
                            lineHeight: 25,
                            rich: {
                                textBorder: {
                                    fontSize: 10,
                                    textBorderColor: '#000',
                                    textBorderWidth: 3,
                                    color: '#fff'
                                },
                            }
                        }
                    }
                }]
            },
            {
                type: 'scatter',
                data: [{
                    value: [270, 320],
                    label: {
                        normal: {
                            show: true,
                            formatter: [
                                '{textBorder|T301B}',
                                '20.7 Bar',
                            ].join('\n'),
                            backgroundColor: '#eee',
                            borderRadius: 10,
                            padding: 5,
                            color: '#000',
                            fontSize: 12,
                            shadowBlur: 3,
                            shadowColor: '#888',
                            lineHeight: 25,
                            rich: {
                                textBorder: {
                                    fontSize: 10,
                                    textBorderColor: '#000',
                                    textBorderWidth: 3,
                                    color: '#fff'
                                },
                            }
                        }
                    }
                }]
            },
            {
                type: 'scatter',
                data: [{
                    value: [370, 230],
                    label: {
                        normal: {
                            show: true,
                            formatter: [
                                '0.00 Mpa',
                            ].join('\n'),
                            backgroundColor: '#eee',
                            borderRadius: 10,
                            padding: 5,
                            color: '#000',
                            fontSize: 12,
                            shadowBlur: 3,
                            shadowColor: '#888',
                            lineHeight: 25,
                            rich: {
                                textBorder: {
                                    fontSize: 10,
                                    textBorderColor: '#000',
                                    textBorderWidth: 3,
                                    color: '#fff'
                                },
                            }
                        }
                    }
                }]
            },
            {
                type: 'scatter',
                data: [{
                    value: [530, 590],
                    label: {
                        normal: {
                            show: true,
                            formatter: [
                                '0.00 Mpa',
                            ].join('\n'),
                            backgroundColor: '#eee',
                            borderRadius: 10,
                            padding: 5,
                            color: '#000',
                            fontSize: 12,
                            shadowBlur: 3,
                            shadowColor: '#888',
                            lineHeight: 25,
                            rich: {
                                textBorder: {
                                    fontSize: 10,
                                    textBorderColor: '#000',
                                    textBorderWidth: 3,
                                    color: '#fff'
                                },
                            }
                        }
                    }
                }]
            },
            {
                type: 'scatter',
                data: [{
                    value: [530, 710],
                    label: {
                        normal: {
                            show: true,
                            formatter: [
                                '41.28 Mpa',
                            ].join('\n'),
                            backgroundColor: '#eee',
                            borderRadius: 10,
                            padding: 5,
                            color: '#000',
                            fontSize: 12,
                            shadowBlur: 3,
                            shadowColor: '#888',
                            lineHeight: 25,
                            rich: {
                                textBorder: {
                                    fontSize: 10,
                                    textBorderColor: '#000',
                                    textBorderWidth: 3,
                                    color: '#fff'
                                },
                            }
                        }
                    }
                }]
            },
            {
                type: 'scatter',
                data: [{
                    value: [700, 100],
                    label: {
                        normal: {
                            show: true,
                            formatter: [
                                '{textBorder|启动20Mpa压缩机}',
                            ].join('\n'),
                            backgroundColor: '#eee',
                            borderRadius: 10,
                            padding: 5,
                            color: '#000',
                            fontSize: 12,
                            shadowBlur: 3,
                            shadowColor: '#888',
                            lineHeight: 25,
                            rich: {
                                textBorder: {
                                    fontSize: 20,
                                    textBorderColor: '#000',
                                    textBorderWidth: 3,
                                    color: '#fff'
                                },
                            }
                        }
                    }
                }]
            },
            {
                type: 'scatter',
                data: [{
                    value: [700, 50],
                    label: {
                        normal: {
                            show: true,
                            formatter: [
                                '{textBorder|启动45Mpa压缩机}',
                            ].join('\n'),
                            backgroundColor: '#eee',
                            borderRadius: 10,
                            padding: 5,
                            color: '#000',
                            fontSize: 12,
                            shadowBlur: 3,
                            shadowColor: '#888',
                            lineHeight: 25,
                            rich: {
                                textBorder: {
                                    fontSize: 20,
                                    textBorderColor: '#000',
                                    textBorderWidth: 3,
                                    color: '#fff'
                                },
                            }
                        }
                    }
                }]
            },
            {
                type: 'scatter',
                data: [{
                    value: [800, 50],
                    label: {
                        normal: {
                            show: true,
                            formatter: [
                                '{textBorder|启动90Mpa压缩机}',
                            ].join('\n'),
                            backgroundColor: '#eee',
                            borderRadius: 10,
                            padding: 5,
                            color: '#000',
                            fontSize: 12,
                            shadowBlur: 3,
                            shadowColor: '#888',
                            lineHeight: 25,
                            rich: {
                                textBorder: {
                                    fontSize: 20,
                                    textBorderColor: '#000',
                                    textBorderWidth: 3,
                                    color: '#fff'
                                },
                            }
                        }
                    }
                }]
            },
            {
                type: 'scatter',
                data: [{
                    value: [500, 50],
                    label: {
                        normal: {
                            show: true,
                            formatter: [
                                '当前运行状态：{textBorder|加氢站自动运营}',
                            ].join('\n'),
                            backgroundColor: '#eee',
                            borderRadius: 10,
                            padding: 5,
                            color: '#000',
                            fontSize: 20,
                            shadowBlur: 3,
                            shadowColor: '#888',
                            lineHeight: 25,
                            rich: {
                                textBorder: {
                                    fontSize: 20,
                                    textBorderColor: 'green',
                                    textBorderWidth: 3,
                                    color: '#fff'
                                },
                            }
                        }
                    }
                }]
            },
            {
                type: "graph",
                coordinateSystem: "cartesian2d",
                symbol: "rect",
                symbolOffset: ["1%", 0],
                label: {
                    normal: {
                        show: true
                    }
                },
                data: [

                    {
                        id: "00",
                        symbolSize: [0, 0],
                        value: [50, 775]
                    },
                    {
                        id: "01",
                        symbolSize: [0, 0],
                        value: [300, 675],
                    },
                    {
                        id: "02",
                        symbolSize: [0, 0],
                        value: [300, 550],
                    },
                    {
                        id: "03",
                        symbolSize: [0, 0],
                        value: [350, 675],
                    },
                    {
                        id: "04",
                        symbolSize: [0, 0],
                        value: [350,550],
                    },

                    {
                        id: "05",
                        symbolSize: [0, 0],
                        value: [400, 675],
                    },
                    {
                        id: "06",
                        symbolSize: [0, 0],
                        value: [400, 550],
                    },

                    {
                        id: "07",
                        symbolSize: [0, 0],
                        value: [300, 375],
                    },
                    {
                        id: "08",
                        symbolSize: [0, 0],
                        value: [300, 275]
                    },
                    {
                        id: "09",
                        symbolSize: [0, 0],
                        value: [250, 375]
                    },
                    {
                        id: "10",
                        symbolSize: [0, 0],
                        value: [250, 275]
                    },
                    {
                        id: "11",
                        symbolSize: [0, 0],
                        value: [300, 100],
                    },
                    {
                        id: "12",
                        symbolSize: [0, 0],
                        value: [200, 100],
                    },
                    {
                        id: "13",
                        symbolSize: [0, 0],
                        value: [300, 200]
                    },
                    {
                        id: "14",
                        symbolSize: [0, 0],
                        value: [400, 200],
                    },
                    {
                        id: "15",
                        symbolSize: [0, 0],
                        value: [300, 450],
                    },
                    {
                        id: "16",
                        symbolSize: [0, 0],
                        value: [400, 450],
                    },
                    {
                        id: "17",
                        symbolSize: [0, 0],
                        value: [480, 200]
                    },
                    {
                        id: "18",
                        symbolSize: [0, 0],
                        value: [500, 200]
                    },
                    {
                        id: "19",
                        symbolSize: [0, 0],
                        value: [500, 550]
                    },
                    {
                        id: "20",
                        symbolSize: [0, 0],
                        value: [500, 675],
                    },
                    {
                        id: "21",
                        symbolSize: [0, 0],
                        value: [250, 775],
                    },
                    {
                        id: "22",
                        symbolSize: [0, 0],
                        value: [550, 550],
                    },
                    {
                        id: "23",
                        symbolSize: [0, 0],
                        value: [250, 675],
                    },
                    {
                        id: "24",
                        symbolSize: [0, 0],
                        value: [250, 550],

                    },
                    {
                        id: "25",
                        symbolSize: [0, 0],
                        value: [550, 675],
                    },
                    {
                        id: "26",
                        symbolSize: [0, 0],
                        value: [630, 200],
                    },
                    {
                        id: "27",
                        symbolSize: [0, 0],
                        value: [680, 250],
                    },
                    {
                        id: "28",
                        symbolSize: [0, 0],
                        value: [250, 900],
                    },
                    {
                        id: "29",
                        symbolSize: [0, 0],
                        value: [400, 900]
                    },
                    {
                        id: "30",
                        symbolSize: [0, 0],
                        value: [480, 900]
                    },
                    {
                        id: "31",
                        symbolSize: [0, 0],
                        value: [750, 900]
                    },
                    {
                        id: "32",
                        symbolSize: [0, 0],
                        value: [680, 900]
                    },
                    {
                        id: "33",
                        symbolSize: [0, 0],
                        value: [680, 675]
                    },
                    {
                        id: "34",
                        symbolSize: [0, 0],
                        value: [630, 675]
                    },
                    {
                        id: "35",
                        symbolSize: [0, 0],
                        value: [680, 675]
                    },
                    {
                        id: "36",
                        symbolSize: [0, 0],
                        value: [630, 550]
                    },
                    {
                        id: "37",
                        symbolSize: [0, 0],
                        value: [680, 550]
                    },
                    {
                        id: "38",
                        symbolSize: [0, 0],
                        value: [680, 200]
                    },
                    {
                        id: "39",
                        symbolSize: [0, 0],
                        value: [680, 400]
                    },
                    {
                        id: "41",
                        symbolSize: [0, 0],
                        value: [780, 200]
                    },
                    {
                        id: "40",
                        symbolSize: [0, 0],
                        value: [780, 400]
                    },
                    {
                        id: "42",
                        symbolSize: [0, 0],
                        value: [780, 675]
                    }
                ],
                links: [
                    {
                        source: "00",
                        target: "21",
                        lineStyle: {
                            color: "#35c2ff",
                            cap: "round",
                            join: "round"
                        }
                    },
                    {
                        source: "21",
                        target: "28",
                        lineStyle: {
                            color: "#35c2ff",
                            cap: "round",
                            join: "round",
                        }
                    },
                    {
                        source: "28",
                        target: "29",
                        lineStyle: {
                            color: "#35c2ff",
                            cap: "round",
                            join: "round"
                        }
                    },
                    {
                        source: "30",
                        target: "31",
                        lineStyle: {
                            color: "red",
                            cap: "round",
                            join: "round"
                        }
                    },
                    {
                        source: "32",
                        target: "33",
                        lineStyle: {
                            color: "red",
                            cap: "round",
                            join: "round"
                        }
                    },
                    {
                        source: "21",
                        target: "23",
                        lineStyle: {
                            color: "#35c2ff",
                            cap: "round",
                            join: "round"
                        }
                    },
                    {
                        source: "23",
                        target: "01",
                        lineStyle: {
                            color: "#35c2ff",
                            cap: "round",
                            join: "round"
                        }
                    },
                    {
                        source: "23",
                        target: "24",
                        lineStyle: {
                            color: "#35c2ff",
                            cap: "round",
                            join: "round"
                        }
                    },
                    {
                        source: "24",
                        target: "02",
                        lineStyle: {
                            color: "#35c2ff",
                            cap: "round",
                            join: "round"
                        }
                    },
                    {
                        source: "03",
                        target: "05",
                        lineStyle: {
                            color: "#35c2ff",
                            cap: "round",
                            join: "round"
                        }
                    },
                    {
                        source: "04",
                        target: "06",
                        lineStyle: {
                            color: "#35c2ff",
                            cap: "round",
                            join: "round"
                        }
                    },
                    {
                        source: "05",
                        target: "16",
                        lineStyle: {
                            color: "#35c2ff",
                            cap: "round",
                            join: "round"
                        }
                    },
                    {
                        source: "07",
                        target: "09",
                        lineStyle: {
                            color: "#35c2ff",
                            cap: "round",
                            join: "round"
                        }
                    },
                    {
                        source: "08",
                        target: "10",
                        lineStyle: {
                            color: "#35c2ff",
                            cap: "round",
                            join: "round"
                        }
                    },
                    {
                        source: "11",
                        target: "12",
                        lineStyle: {
                            color: "#35c2ff",
                            cap: "round",
                            join: "round"
                        }
                    },
                    {
                        source: "16",
                        target: "15",
                        lineStyle: {
                            color: "#35c2ff",
                            cap: "round",
                            join: "round"
                        }
                    },
                    {
                        source: "15",
                        target: "11",
                        lineStyle: {
                            color: "#35c2ff",
                            cap: "round",
                            join: "round"
                        }
                    },
                    {
                        source: "13",
                        target: "14",
                        lineStyle: {
                            color: "#35c2ff",
                            cap: "round",
                            join: "round"
                        }
                    },
                    {
                        source: "17",
                        target: "18",
                        lineStyle: {
                            color: "#35c2ff",
                            cap: "round",
                            join: "round"
                        }
                    },
                    {
                        source: "18",
                        target: "20",
                        lineStyle: {
                            color: "#35c2ff",
                            cap: "round",
                            join: "round"
                        }
                    },
                    {
                        source: "20",
                        target: "25",
                        lineStyle: {
                            color: "#35c2ff",
                            cap: "round",
                            join: "round"
                        }
                    },
                    {
                        source: "19",
                        target: "22",
                        lineStyle: {
                            color: "#35c2ff",
                            cap: "round",
                            join: "round"
                        }
                    },
                    {
                        source: "34",
                        target: "35",
                        lineStyle: {
                            color: "#35c2ff",
                            cap: "round",
                            join: "round"
                        }
                    },
                    {
                        source: "36",
                        target: "37",
                        lineStyle: {
                            color: "#35c2ff",
                            cap: "round",
                            join: "round"
                        }
                    },
                    {
                        source: "35",
                        target: "38",
                        lineStyle: {
                            color: "#35c2ff",
                            cap: "round",
                            join: "round"
                        }
                    },
                    {
                        source: "39",
                        target: "40",
                        lineStyle: {
                            color: "#35c2ff",
                            cap: "round",
                            join: "round"
                        }
                    },
                    {
                        source: "38",
                        target: "41",
                        lineStyle: {
                            color: "#35c2ff",
                            cap: "round",
                            join: "round"
                        }
                    },
                    {
                        source: "33",
                        target: "42",
                        lineStyle: {
                            color: "red",
                            cap: "round",
                            join: "round"
                        }
                    },
                ],
                lineStyle: {
                    normal: {
                        opacity: 0.1,
                        curveness: 0,
                        width: 12,
                    }
                }
            },
            {
                type: "lines",
                coordinateSystem: "cartesian2d",
                polyline: true,
                effect: {
                    show: true,
                    period: 8,
                    trailLength: 0.71,
                    symbolSize: 13,
                    symbol: "circle",
                    loop: true,

                },
                lineStyle: {
                    normal: {
                        opacity: 0.5, //线条透明度
                        color: "#90caf9",
                        width: 0,
                        curveness: 0 //动画线路的曲度
                    }

                },
                data: [
                    {
                        coords: [
                            [50, 775],
                            [250, 775],
                            [250, 900],
                            [400, 900]
                        ]
                    },
                    {
                        coords: [
                            [50, 775],
                            [250, 775],
                            [250, 675],
                            [300, 675]
                        ]
                    },
                    {
                        coords: [
                            [50, 775],
                            [250, 775],
                            [250, 675],
                            [250, 550],
                            [300, 550]
                        ]
                    },
                    {
                        coords: [
                            [350, 675],
                            [400, 675],
                            [400, 550],
                            [400, 450],
                            [400, 450],
                            [300, 450],
                            [300, 200],
                            [300, 100],
                            [200, 100]
                        ]
                    },
                    {
                        coords: [
                            [350, 550],
                            [400, 550],
                            [400, 450],
                            [300, 450],
                            [300, 200],
                            [400, 200]
                        ]
                    },
                    // {
                    //     coords: [
                    //         [100, 500],
                    //         [630, 500],
                    //         [630, 200],
                    //         [700, 200],
                    //         [700, 250],
                    //         [680, 250],
                    //         [680, 550],
                    //         [100, 550],
                    //     ]
                    // },
                    // {
                    //     coords: [
                    //         [100, 500],
                    //         [200, 500],
                    //         [200, 800],
                    //         [300, 800],
                    //         [300, 850],
                    //         [250, 850],
                    //         [250, 550],
                    //         [100, 550],
                    //     ]
                    // },
                    // {
                    //     coords: [
                    //         [100, 500],
                    //         [200, 500],
                    //         [200, 800],
                    //         [500, 800],
                    //         [500, 850],
                    //         [250, 850],
                    //         [250, 550],
                    //         [100, 550],
                    //     ]
                    // },
                    // {
                    //     coords: [
                    //         [100, 500],
                    //         [200, 500],
                    //         [200, 800],
                    //         [700, 800],
                    //         [700, 850],
                    //         [250, 850],
                    //         [250, 550],
                    //         [100, 550],
                    //     ]
                    // },
                    // {
                    //     coords: [
                    //         [100, 500],
                    //         [200, 500],
                    //         [200, 800],
                    //         [900, 800],
                    //         [900, 850],
                    //         [250, 850],
                    //         [250, 550],
                    //         [100, 550],
                    //     ]
                    // },
                ]
            },
        ]
    };

    myChart.setOption(option);
    window.addEventListener('resize', function () {myChart.resize();})

}
function char2() {

    var myChart = echarts.init($("#char2")[0]);

    option = {
        tooltip : {
            trigger: 'axis',
            axisPointer : {            // 坐标轴指示器，坐标轴触发有效
                type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
            }
        },
        grid: {show:'true',borderWidth:'0'},
        legend: {
            data:['行驶', '停车','熄火','离线'],
            textStyle : {
                color : '#ffffff',

            }
        },

        calculable :false,
        xAxis : [
            {
                type : 'value',
                axisLabel: {
                    show: true,
                    textStyle: {
                        color: '#fff'
                    }
                },
                splitLine:{
                    lineStyle:{
                        color:['#f2f2f2'],
                        width:0,
                        type:'solid'
                    }
                }

            }
        ],
        yAxis : [
            {
                type : 'category',
                data : ['客运车','危险品车','网约车','学生校车'],
                axisLabel: {
                    show: true,
                    textStyle: {
                        color: '#fff'
                    }
                },
                splitLine:{
                    lineStyle:{
                        width:0,
                        type:'solid'
                    }
                }
            }
        ],
        series : [
            {
                name:'行驶',
                type:'bar',
                stack: '总量',
                itemStyle : { normal: {label : {show: true, position: 'insideRight'}}},
                data:[320, 302, 301, 334]
            },
            {
                name:'停车',
                type:'bar',
                stack: '总量',
                itemStyle : { normal: {label : {show: true, position: 'insideRight'}}},
                data:[120, 132, 101, 134]
            },
            {
                name:'熄火',
                type:'bar',
                stack: '总量',
                itemStyle : { normal: {label : {show: true, position: 'insideRight'}}},
                data:[220, 182, 191, 234]
            },
            {
                name:'离线',
                type:'bar',
                stack: '总量',
                itemStyle : { normal: {label : {show: true, position: 'insideRight'}}},
                data:[150, 212, 201, 154]
            }

        ]
    };

    myChart.setOption(option);
    window.addEventListener('resize', function () {myChart.resize();})

}
function char3() {

    var myChart = echarts.init($("#char3")[0]);

    option = {
        legend: {
            data:['车辆行驶数量'],
            textStyle : {
                color : '#ffffff',

            }
        },
        grid: {show:'true',borderWidth:'0'},

        calculable : false,
        tooltip : {
            trigger: 'axis',
            formatter: "Temperature : <br/>{b}km : {c}°C"
        },
        xAxis : [
            {
                type : 'value',
                axisLabel : {
                    formatter: '{value}',
                    textStyle: {
                        color: '#fff'
                    }
                },

                splitLine:{
                    lineStyle:{
                        width:0,
                        type:'solid'
                    }
                }
            }
        ],
        yAxis : [
            {
                type : 'category',
                axisLine : {onZero: false},
                axisLabel : {
                    formatter: '{value} km',
                    textStyle: {
                        color: '#fff'
                    }
                },
                splitLine:{
                    lineStyle:{
                        width:0,
                        type:'solid'
                    }
                },
                boundaryGap : false,
                data : ['0', '10', '20', '30', '40', '50', '60', '70', '80']
            }
        ],
        series : [
            {
                name:'车辆行驶数量',
                type:'line',
                smooth:true,
                itemStyle: {
                    normal: {
                        lineStyle: {
                            shadowColor : 'rgba(0,0,0,0.4)'
                        }
                    }
                },
                data:[15, 0, 20, 45, 22.1, 25, 70, 55, 76]
            }
        ]
    };

    myChart.setOption(option);
    window.addEventListener('resize', function () {myChart.resize();})

}
function char4() {

    var myChart = echarts.init($("#char4")[0]);

    option = {
        grid: {show:'true',borderWidth:'0'},
        tooltip : {
            trigger: 'axis',
            axisPointer : {            // 坐标轴指示器，坐标轴触发有效
                type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
            },

            formatter: function (params) {
                var tar = params[0];
                return tar.name + '<br/>' + tar.seriesName + ' : ' + tar.value;
            }
        },

        xAxis : [
            {
                type : 'category',
                splitLine: {show:false},
                data : ['客运车','危险品车','网约车','学生校车'],
                axisLabel: {
                    show: true,
                    textStyle: {
                        color: '#fff'
                    }
                }

            }
        ],
        yAxis : [
            {
                type : 'value',
                splitLine: {show:false},
                axisLabel: {
                    show: true,
                    textStyle: {
                        color: '#fff'
                    }
                }
            }
        ],
        series : [

            {
                name:'报警数量',
                type:'bar',
                stack: '总量',
                itemStyle : { normal: {label : {show: true, position: 'inside'}}},
                data:[2900, 1200, 300, 200, 900, 300]
            }
        ]
    };

    myChart.setOption(option);
    window.addEventListener('resize', function () {myChart.resize();})

}
function char5() {

    var myChart = echarts.init($("#char5")[0]);

    option = {
        grid: {show:'true',borderWidth:'0'},
        tooltip : {
            trigger: 'axis',
            axisPointer : {            // 坐标轴指示器，坐标轴触发有效
                type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
            },

            formatter: function (params) {
                var tar = params[0];
                return tar.name + '<br/>' + tar.seriesName + ' : ' + tar.value;
            }
        },

        xAxis : [
            {
                type : 'category',
                splitLine: {show:false},
                data : ['客运车','危险品车','网约车','学生校车'],
                axisLabel: {
                    show: true,
                    textStyle: {
                        color: '#fff'
                    }
                }

            }
        ],
        yAxis : [
            {
                type : 'value',
                splitLine: {show:false},
                axisLabel: {
                    show: true,
                    textStyle: {
                        color: '#fff'
                    }
                }
            }
        ],
        series : [

            {
                name:'报警数量',
                type:'bar',
                stack: '总量',
                itemStyle : { normal: {label : {show: true, position: 'inside'}}},
                data:[2900, 1200, 300, 200, 900, 300]
            }
        ]
    };

    myChart.setOption(option);
    window.addEventListener('resize', function () {myChart.resize();})

}